import { createRouter, createWebHashHistory } from 'vue-router'
import routes from '@/router/routes';
import useUserStore from "@/stores/user";

const router = createRouter({
	history: createWebHashHistory(import.meta.env.BASE_URL),
	routes
})

// router.beforeEach((to, from) => {
// 	const store = useUserStore();
// 	if (!store.sessionKey && to.meta.requireAuth) {
// 		router.push({ name: 'Index' });
// 		return false;
// 	}
// 	return true;
// })



export default router
